<h2>Branch Office Details</h2>
<?php
    $this->headTitle('Branch office details');
    $this->headScript()->appendFile('/js/BizSense/Crud.js');  
    $acl = $this->acl;
    $user = $this->currentUser;
?>

<a href="/admin/index/index">Administration</a> | 

<?php if ($acl->isAllowed($this->currentUser, 'access branch pages')): ?>
    <a href="/admin/branch">Branches</a> |
<?php endif; ?>

<?php if ($acl->isAllowed($this->currentUser, 'edit branch')): ?>
<a href="/admin/branch/edit/branch_id/<?php 
        echo $this->branch->branch_id; 
    ?>">Edit</a> |
<?php endif; ?>

<?php if  ($acl->isAllowed($user,'delete branch')):
    $deleteUrl = $this->url(
                    array(
                        'module' => 'admin',
                        'controller' => 'branch',
                        'action' => 'delete',
                        'account_id' =>$this->escape($this->branch->branch_id)
                    )
                );
                echo $this->deleteButton($deleteUrl); 
 endif; ?>
|
<?php
    $branch = $this->branch;
?>
<table class="data_table">
    <tr>
        <td>Branch Name</td>
        <td>
            <?php echo $this->escape($branch->branch_name);?>
        </td>
    </tr>
    <tr>
        <td>Branch Manager</td>
        <td><?php echo $this->escape($branch->assignedToEmail);?></td>
    </tr>
    <tr>
        <td>Address</td>
        <td>
            <?php echo $this->escape($branch->address_line_1);?> <br />
            <?php echo $this->escape($branch->address_line_2);?> <br />
            <?php echo $this->escape($branch->address_line_3);?> <br />
            <?php echo $this->escape($branch->address_line_4);?>
        </td>
    </tr>
    <tr>
        <td>City</td>
        <td><?php echo $this->escape($branch->city);?></td>
    </tr>
    <tr>
        <td>State</td>
        <td><?php echo $this->escape($branch->state);?></td>
    </tr>
    <tr>
        <td>Postal code</td>
        <td><?php echo $this->escape($branch->postal_code);?></td>
    </tr>

    <tr>
        <td>Country</td>
        <td><?php echo $this->escape($branch->country);?></td>
    </tr>
    <tr>
        <td>Phone</td>
        <td><?php echo $this->escape($branch->phone);?></td>
    </tr>
    <tr>
        <td>Fax</td>
        <td><?php echo $this->escape($branch->fax);?></td>
    </tr>
    <tr>
        <td>Email</td>
        <td><?php echo $this->escape($branch->email);?>
        </td>
    </tr>
    <tr>
        <td>Service Tax Number</td>
        <td><?php echo $this->escape($branch->service_tax_number);?>
        </td>
    </tr>
    <tr>
        <td>TIN</td>
        <td><?php echo $this->escape($branch->tin);?></td>
    </tr>
    <tr>
        <td>Parent Branch</td>
        <td><?php echo $this->escape($branch->parentBranchName);?></td>
    </tr>
    <tr>
        <td>Description</td>
        <td><?php echo $this->escape($branch->description);?></td>
    </tr>
</table>
